import random
import time

start_time = time.time()
print("start_time", start_time)

j = 1
while 1:
    j += 1
    r = random.random()
    end_time = time.time()
    if end_time - start_time >= 1: #运行时间大于1秒就跳出执行函数
        break

print("j", j)
print("end_time", end_time)

a = 600
if a >500 and a <700:
    print 1
elif a >1 :
    print 2